#pragma once

#include "funpl.h"
#include <string>
#include "range.h"
#include <vector>

namespace funpl
{

namespace parser
{

/// Immutable source file.
struct source_file
{
	const std::string name;
	const std::string path;
	const std::string text;

	/// Constructor.
	source_file(const util::const_char_range &name, const util::const_char_range path, const util::const_char_range text)
		: name(lean::from_range<std::string>(name)), path(lean::from_range<std::string>(path)), text(lean::from_range<std::string>(text)) { }
	/// Constructor.
	template <class T1, class T2, class T3>
	source_file(T1 &&name, T2 &&path, T3 &&text)
		: name(std::forward<T1>(name)), path(std::forward<T2>(path)), text(std::forward<T3>(text)) { }
};



} // namespace

} // namespace